<#assign ctx=springMacroRequestContext.contextPath />
<#include "/macro/publicMacro.ftl">
<#import "/macro/Dialog.ftl" as Dialog>
<#import "/macro/Card.ftl" as Card>

<@header title="查看角色授权">

</@header>

<@body>
    <h2 class="module-title">查看角色授权</h2>

    <div class="alert alert-primary" role="alert">
        <nav class="nav">
            <#--<button class="btn btn-info" onclick="javascript: history.back(-1);return false;">返回</button>-->
            <a class="btn btn-info btn-sm" href="${ctx}/role/list" role="button" aria-pressed="true">返回</a>
            <span style="margin-right: 50px; margin-left: 100px">角色名称:<span style="font-size: 20px; margin-left: 10px">${role.name}</span></span>
        </nav>
    </div>

    <div class="alert alert-info" role="alert">
        <div class="accordion" id="accordionExample">
            <ul class="list-group">
                <#list authorityGroupMap?keys as key>
                    <@Card.Card id="role${key}" title="${key}">
                        <li class="list-group-item">
                            <#list authorityGroupMap[key] as authority>
                                <#if authorityMap["${authority.id}"]??>
                                <div class="form-check form-check-inline">
                                    <#--<input type="checkbox" class="form-check-input" name="authoritys" id="authority${authority.id}" value="${authority.id}" disabled checked/>-->
                                    <label class="form-check-label" for="authority${authority.id}">${authority.description}(${authority.name})</label>
                                </div>
                                </#if>
                            </#list>
                        </li>
                    </@Card.Card>
                </#list>
            </ul>
        </div>
    </div>

</@body>

<@footer>

</@footer>